from celery import Celery
import os
# 在celery_tasks上级目录执行命令启动异步服务
# celery -A celery_tasks.main worker -l info
# -A：指定worker -l：指定日志输出级别
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'server.settings.dev')

celery_app = Celery('meiduo')

celery_app.config_from_object('celery_tasks.config')
#自动注册异步任务
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.email'])




